package com.naiterui.ehp.bs.patient.service;

import com.naiterui.common.repository.page.PageParamVO;
import com.naiterui.common.repository.page.PageVO;
import com.naiterui.ehp.bp.support.exception.BusinessException;
import com.naiterui.ehp.bs.patient.vo.comment.CommentParamVO;
import com.naiterui.ehp.bs.patient.vo.comment.CommentVO;

import java.util.List;
import java.util.Map;

/**
 * @Description 会话评价
 * @Author gongbaoqiang
 * @Date 2020/6/30 6:09 PM
 */
public interface IConsultCommentService {

    /**
     * 获取医生的所有评价
     * @param doctorId
     * @return
     * @throws BusinessException
     */
    PageVO findAllByDoctorId(Long doctorId, PageParamVO pageParamVO) throws BusinessException;


    /**
     * 初始化评价页面
     * @param doctorId
     * @return
     * @throws BusinessException
     */
    CommentVO init(Long doctorId) throws BusinessException;

    /**
     * 提交评价
     * @param patientId
     * @param paramVO
     * @throws BusinessException
     */
    void submit(Long patientId, CommentParamVO paramVO) throws BusinessException;

    /**
     * 获取好评率
     * @param doctorIds
     * @return
     * @throws BusinessException
     */
    Map<Long, String> getPraiseRate(List<Long> doctorIds) throws BusinessException;

    /**
     * 判断会话是否已做过评价
     * @param consultSessionId
     * @param type
     * @return
     * @throws BusinessException
     */
    Boolean existByConsultSession(Long consultSessionId, Integer type) throws BusinessException;

    /**
     * 会话评价回复
     * @param patientId
     * @param msg
     * @throws BusinessException
     */
    void reply(Long patientId, String msg) throws BusinessException;

}
